package com.example.demo2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/*
Restful请求
http get/post
新建 post /url/ json
         post /drink/ {"name :"奶茶” , “price”:"8.00"}
修改 put /url/ json
         put
 */

@RestController
@RequestMapping("/hello")
public class HelloController {

//   get  /hello/
    @GetMapping("/")
    public String sayHi(@RequestParam("name") String name){
        return name+ ",欢迎使用spring boot";
    }
}
